#include "ProcessBar.h"
#define STYLE '='
#define NUM 101

void Process()
{

    char bar[NUM] = {0};
    int cnt = 0;
    char *lable = "|/-\\";
    int len = strlen(lable);
    memset(bar, '\0', sizeof(bar));
    while(cnt <= 100)
    {
        printf("[%-100s][%3d%%][%c]\r", bar, cnt, lable[cnt%len]);
        fflush(stdout);
        usleep(1000000);
        bar[cnt] = STYLE;
        cnt++;
        if(cnt == NUM-1)
        {
            printf("[%-100s][%d%%][%c]\r", bar, cnt, lable[cnt%len]);
			break;
        }
        bar[cnt] = '>';
    }
    printf("\n");
   // printf("test\n");
    
}
